﻿using Nemerle.Collections;
using Nemerle.Text;
using Nemerle.Utility;

using System;
using System.Collections.Generic;
using System.Linq;

using VladimirMatveev.NotifyPropertyChanged;

class ComponentUser
{
  [ImplementsNotifyPropertyChanged]
  class Component {
    private mutable y : string;
    public X : int {get;set;};
    
    [IgnoreProperty]
    public Y : string { 
      get { y } 
      set {
        y = value;
        RaisePropertyChanged("Y");
      } 
    } 
  }
  public UseComponent() : void {
    def component = Component();
    component.PropertyChanged += fun(_,e) {
      Console.WriteLine(
        $"$(e.PropertyName) changed"
      );
    };
    component.X = 42;
    component.Y = "Answer to the Ult...";
  }
}

// X changed
// Y changed
